﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace LogModel
{
    [DataContract]
    public class AppRunningRecord
    {
        [DataMember]
        public int id { get; set; }
    
        [DataMember]
        public string startupPath { get; set; }
      
        [DataMember]
        public int pid { get; set; }
        
        [DataMember]
        public int ppid { get; set; }
       
        [DataMember]
        public string guid { get; set; }
      
        [DataMember]
        public string processName { get; set; }
       
        [DataMember]
        public string fileVersion { get; set; }
       
        [DataMember]
        public string assemblyVersion { get; set; }
       
        [DataMember]
        public string testMode { get; set; }
       
        [DataMember]
        public DateTime startupTime { get; set; }
       
        [DataMember]
        public DateTime exitTime { get; set; }

        [DataMember]
        public int exitCode { get; set; }

        [DataMember]
        public string startupParams { get; set; }

        [DataMember]
        public string lastStatus { get; set; }

        [DataMember]
        public DateTime updateTime { get; set; }

        [DataMember]
        public int memoryUsage { get; set; }

        public AppRunningRecord()
        {
            memoryUsage = 0;
            guid = Guid.NewGuid().ToString();
            exitCode = -99;
            pid = 0;
            ppid = 0;
            testMode = "0";
        }
    }
}
